bitkeeper revision 1.1159.6.4 (41177393RXYTn_RK_wu6NpLesN04YA)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 9 Aug 2004 12:52:35 +0000 (12:52 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 9 Aug 2004 12:52:35 +0000 (12:52 +0000)
Raise an error when vbd grow fails.

tools/python/xen/xend/server/blkif.py

index a51754bad31318589629601ada53a6655dd716ce..192871d12448e341b0760427eec199993df84710 100755 (executable)
@@ -5,6 +5,7 @@ from twisted.internet import defer
 
 from xen.xend import sxp
 from xen.xend.XendLogging import log
+from xen.xend.XendError import XendError
 
 import channel
 import controller
@@ -193,13 +194,11 @@ class BlkifControllerFactory(controller.ControllerFactory):
         @type  d: Deferred or None
         """
         val = unpackMsg('blkif_be_vbd_grow_t', msg)
-        # Check status?
        status = val['status']
        if status != BLKIF_BE_STATUS_OKAY:
-            log.debug("Error: Adding extent to vbd failed! (device %x)",
-                     val['extent.device'])
-            # what to do here to abort????
-
+            raise XendError("Adding extent to vbd failed: device %x, error %d",
+                            val['extent.device'],
+                            status)
         if self.attached:
             if d:
                 d.callback(dev)